package top.huhuiyu.spirngboot2.total.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import top.huhuiyu.spirngboot2.total.entity.TbNews;

@Mapper
public interface TbNewsDAO extends BaseMapper<TbNews> {
    @Update("update tb_news set hits=hits + 1 where nid=#{nid}")
    public int updateHits(@Param("nid") Integer nid);
}
